Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support of errors.tolerance #143

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Joel-hanson
Copy link
Contributor

This pull request introduces several changes to the Kafka MQ source connector, focusing on error handling and testing improvements. The most important changes include adding a new dependency, implementing error tolerance in the JsonRecordBuilder, and adding new test cases to ensure proper functionality.

Dependency Management:

  • Added connect-runtime dependency to pom.xml to support Kafka connect runtime features.

Error Handling:

  • Implemented error tolerance in JsonRecordBuilder by adding the toleranceType field and configuring it based on the connector properties. Updated the getValue method to handle exceptions based on the tolerance type. [1] [2] [3] [4]
  • Modified MQSourceTask to filter out null SourceRecord objects, allowing for error tolerance handling.

Testing:

  • Added new test cases in JsonRecordBuilderIT to verify JSON parsing errors and error tolerance behavior.
  • Imported necessary classes for the new test cases in JsonRecordBuilderIT.

- Added a IT for error tolerance
- Added conditions with in JSONRecordBuilder for error tolerance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant